package com.verifone.tony.databasetest;

//--------------------- dbflow --------------------------
import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
import com.raizlabs.android.dbflow.annotation.Table;

import com.raizlabs.android.dbflow.structure.BaseModel;

@Table(database = MyDatabase.class) //上面自己创建的类（定义表的名称 版本）
public class DBFlowModel extends BaseModel{

    @Column
    @PrimaryKey(autoincrement = true) //主键  //autoincrement 开启自增
    public Integer id;
    @Column               //表示一栏 一列
    private  String modelname; //自己需要存储的字段
    @Column               //表示一栏 一列
    private  String name; //自己需要存储的字段
    @Column
    private int age;
    @Column
    private String address;


    public String getModelname() { return this.modelname; }
    public void setModelname(String modelname) { this.modelname = modelname; }

    public String getName() { return this.name; }
    public void setName(String name) { this.name = name; }

    public int getAge() { return this.age; }
    public void setAge(int age) { this.age = age; }

    public String getAddress() { return this.address; }
    public void setAddress(String address) { this.address = address; }

    //change model [3]
    @Column
    private String phone;
    public String getPhone() { return this.phone; }
    public void setPhone(String phone) { this.phone = phone; }

    @Column
    private String email;
    public String getEmail() { return this.email; }
    public void setEmail(String email) { this.email = email; }
/*    public String getPhone() { return null; }
    public void setPhone(String phone) { }*/
}